<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>订单退款/退货</title>
    <meta name="description" content="这是一个订单退款/退货页面">
    <meta name="keywords" content="订单退款/退货">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="icon" type="image/png" href="${contextPath}/assets/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="${contextPath}/assets/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
    <link rel="stylesheet" href="${contextPath}/assets/css/amazeui.min.css"/>
    <link rel="stylesheet" href="${contextPath}/assets/css/amazeui.datatables.min.css"/>
    <link rel="stylesheet" href="${contextPath}/assets/css/app.css">
    <script src="${contextPath}/assets/js/jquery.min.js"></script>

</head>

<body data-type="widgets">
<script src="${contextPath}/assets/js/theme.js"></script>
<div class="am-g tpl-g">
    <!-- 头部 -->
    <#include "/pc/common/header.html" />
    <!-- 侧边导航栏 -->
    <#include "/pc/common/left.html" />
    <!-- 内容区域 -->
    <div class="tpl-content-wrapper">
        <div class="row-content am-cf">
            <div class="row">
                <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                    <div class="widget am-cf">
                        <ol class="am-breadcrumb widget-head">
                            <li><a href="${contextPath}/index.htm" class="am-icon-home">首页</a></li>
                            <li>订单管理</li>
                            <#if order.orderstatus?? && order.orderstatus==5>
                            <li>订单退款</li>
                                <#elseif order.orderstatus?? && order.orderstatus==6>
                                    <li>订单退货</li>
                            </#if>
                        </ol>
                        <div class="widget-body am-fr am-u-sm-12">
                            <div class="am-panel am-panel-default am-panel-default">
                                <div class="am-panel-hd">商品信息</div>
                                <#list opList as product>
                                    <div class="am-panel-bd" style="padding-left: 20px">
                                        <div class="am-g">
                                            <div class="am-u-sm-2 am-text-center">
                                                <img src="${product.smimg!}" height="65">
                                            </div>
                                            <div class="am-u-sm-7">
                                                <p><strong>商品名称：</strong>${product.proname!}</p>
                                                <p><strong>商品简称：</strong>${product.shortname!}</p>
                                            </div>
                                            <div class="am-u-sm-3">
                                                <p><strong>商品原价：</strong><del>${product.oldprice!}</del><small>元</small></p>
                                                <p><strong>商品现价：</strong>${product.price!}<small>元</small></p>
                                            </div>
                                        </div>
                                    </div>
                                </#list>
                            </div>
                            <div class="am-panel am-panel-default am-panel-default">
                                <div class="am-panel-hd">订单信息</div>
                                <div class="am-panel-bd" style="padding-left: 20px">
                                    <div class="am-g">
                                        <div class="am-u-sm-4">
                                            <#if order.cityid??>
                                                <p><strong>所属城市：</strong>${dict.getCityName(order.cityid?c)}</p>
                                            </#if>
                                        </div>
                                        <div class="am-u-sm-4">
                                            <p>
                                                <strong>订单编号：</strong>${order.orderno!''}
                                            </p>
                                        </div>
                                        <div class="am-u-sm-4">
                                            <#if order.createtime??>
                                                <p><strong>下单时间：</strong>${order.createtime?string('yyyy-MM-dd HH:mm:ss')}
                                                </p>
                                            </#if>
                                        </div>
                                    </div>
                                    <div class="am-g">
                                        <div class="am-u-sm-4">
                                            <p><strong>订单金额：</strong>${order.amount!0}<small>元</small></p>
                                        </div>
                                        <div class="am-u-sm-4">
                                            <#if pay??>
                                                <p>
                                                    <strong>支付方式：</strong>
                                                    <#if pay.paytype??>
                                                        ${dict.getDicName('order_pay_payType',pay.paytype?c)}
                                                    </#if>
                                                    <#if pay.status?? && pay.status==1>
                                                        <span class="am-badge am-badge-success">已支付</span>
                                                    </#if>
                                                    <#if pay.status?? && pay.status==0>
                                                        <span class="am-badge am-badge-warning">未支付</span>
                                                    </#if>
                                                </p>
                                            </#if>
                                        </div>
                                        <div class="am-u-sm-4">
                                            <p><strong>订单类型：</strong>
                                                <#if order.ordertype??>
                                                    ${dict.getDicName('order_info_orderType',order.ordertype?c)}
                                                </#if>
                                            </p>
                                        </div>
                                    </div>
                                    <div class="am-g">
                                        <div class="am-u-sm-4">
                                            <p><strong>使用积分：</strong>${order.integral!'0'}</p>
                                        </div>
                                        <div class="am-u-sm-4">
                                            <p><strong>优惠金额：</strong>${order.discountamount!0}<small>元</small></p>
                                        </div>
                                        <div class="am-u-sm-4">
                                            <p><strong>支付金额：</strong>${order.payamount!0}<small>元</small></p>
                                        </div>
                                    </div>
                                    <div class="am-g">
                                        <div class="am-u-sm-4">
                                            <p><strong>收件人：</strong>${order.disname!''}</p>
                                        </div>
                                        <div class="am-u-sm-4">
                                            <p><strong>收件人电话：</strong>${order.distel!''}</p>
                                        </div>
                                        <div class="am-u-sm-4">
                                            <p><strong>订单备注：</strong>${order.remark!'无'}</p>
                                        </div>
                                    </div>
                                    <div class="am-g">
                                        <div class="am-u-sm-4">
                                            <p>
                                                <strong>订单状态：</strong>
                                                <#if dis??>
                                                    <span class="am-badge am-badge-success">已发货</span>
                                                    <#else>
                                                        <span class="am-badge am-badge-success">未发货</span>
                                                </#if>
                                                <span class="am-badge am-badge-warning">
                                                <#if order.orderstatus??>
                                                    ${dict.getDicName('order_info_orderStat',order.orderstatus?c)}
                                                </#if>
                                                </span>
                                            </p>
                                        </div>
                                        <div class="am-u-sm-8">
                                            <p><strong>配送地址：</strong>${order.provincename!''}${order.cityname!''}${order.regionname!''}${order.addr!''}</p>
                                        </div>
                                    </div>
                                    <div class="am-g">
                                        <div class="am-u-sm-4">
                                            <#if dis??>
                                                <p><strong>配送公司：</strong>${dis.companyname!''}</p>
                                            </#if>
                                        </div>
                                        <div class="am-u-sm-4">
                                            <#if dis??>
                                                <p><strong>配送单号：</strong>${order.disno!''}</p>
                                            </#if>
                                        </div>
                                        <div class="am-u-sm-4">
                                            <#if dis??>
                                                <p><strong>配送金额：</strong>${order.disamount!''}<small>元</small></p>
                                            </#if>
                                        </div>
                                    </div>
                                    <div class="am-g am-text-center" style="padding-top: 10px">
                                        <div class="am-form-group">
                                            <#if order.orderstatus?? && order.orderstatus==5>
                                                <a class="am-btn am-btn-primary" href="javascript:;" onclick="back_b('退款')">
                                                    点击退款
                                                </a>
                                                <#elseif order.orderstatus?? && order.orderstatus==6>
                                                    <a class="am-btn am-btn-primary" href="javascript:;" onclick="back_b('退货')">
                                                        点击退货
                                                    </a>
                                            </#if>
                                            <#if dis??>
                                            <a class="am-btn am-btn-success" target="_blank" href="${contextPath}/order/express.htm?disNo=${order.disno!}&companyName=${dis.companyname!}">
                                                物流信息
                                            </a>
                                            </#if>
                                            <a href="javascript:history.back();" class="am-btn am-btn-default">返回</a>
                                            <input type="hidden" id="id" name="id" value="${order.id}">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
<#include "/pc/common/alert.html" />
<script src="${contextPath}/assets/js/amazeui.min.js"></script>
<script src="${contextPath}/assets/js/amazeui.datatables.min.js"></script>
<script src="${contextPath}/assets/js/dataTables.responsive.min.js"></script>
<script src="${contextPath}/assets/js/amazeui.page.js"></script>
<script src="${contextPath}/assets/js/app.js"></script>
<script>
    function back_b(msg){
        var id = $("#id").val();
        Mconfirm("你确定要"+msg+"吗？",function(){
            $.ajax({
                url:"${contextPath}/order/doback.htm?id="+id,
                type:"get",
                dataType:"json",
                success:function(data){
                    var json = $.parseJSON(data);
                    Malert(json.errMessage,function(){
                        location.reload();
                    });
                }
            });
        })
    }
</script>
</body>

</html>